<template>
	<view class="isitemBox">
		<view class="linehegth"></view>
		<view class="isMoneyCard">
			<view class="headerTitleBox">
				<view class="isMoneyYuan">可提现金额(元)</view>
				<!-- <image class="iconImage" src="../../../static/backgroundImage/组 2983.png" mode=""></image> -->
				<uni-icons type="help" color="#fff" size="26"></uni-icons>

			</view>
			<view class="moneyBoxISnow">
				<view class="moneyWord">{{isMoney}}</view>
				<view class="moneyButton" @click="goToMakeMoney">提现</view>
			</view>
			<view class="selectAllbox">
				<view class="isitemboCx">
					<view class="isitemindex">累计收益(元)</view>
					<view class="isitemMoney">{{isMoneyFrom.isall}}</view>
				</view>
				<view class="isitemboCx">
					<view class="isitemindex">今日获得(元)</view>
					<view class="isitemMoney">{{isMoneyFrom.nowDay}}</view>
				</view>
				<view class="isitemboCx">
					<view class="isitemindex">近7日获得(元)</view>
					<view class="isitemMoney">{{isMoneyFrom.sevenDay}}</view>
				</view>
			</view>
		</view>
	</view>
		
		
</template>

<script setup>
	import { onMounted, ref } from 'vue';
	import { GetwithDraData } from '../../../config/API/shareBack';
	const isMoney = ref(0)
	const isMoneyFrom=ref({
		isall:566.0,
		nowDay:6.80,
		sevenDay:86.60
	})
	onMounted(async()=>{
		const data = await GetwithDraData()
		// console.log('分享返利',data)
		isMoneyFrom.value.isall = data.data.total_money
		isMoneyFrom.value.nowDay = data.data.day_money
		isMoneyFrom.value.sevenDay = data.data.week_money
		isMoney.value = data.data.withdrawal_money
	})
	const goToMakeMoney = () =>{
		uni.navigateTo({
			url:'/myselfSubpages/ShareBackMoney/IsMoney'
		})
	}
</script>

<style scoped>
	@import url('../css/BackMoney.css');
</style>